﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Diagnostics;
using Hammock.Model;
using Newtonsoft.Json;

namespace Weibo4Sharp.Model
{

#if !SILVERLIGHT
    /// <summary>
    /// This data class provides more information than the basic data provided by
    /// <see cref="WeiboUser" /> returned in other calls for friends and followers.
    /// </summary>
    [Serializable]
#endif
#if !Smartphone && !NET20
    [DataContract]
    [DebuggerDisplay("{Id}")]
#endif
    [JsonObject(MemberSerialization.OptIn)]
    public class WeiboCount : PropertyChangedBase,
                              IWeiboModel
    {
        private long _id;
        private int _comments;
        private int _rt;

#if !Smartphone && !NET20
        [DataMember]
#endif
        public virtual long Id
        {
            get { return _id; }
            set
            {
                if (_id == value)
                {
                    return;
                }

                _id = value;
                OnPropertyChanged("Id");
            }
        }

#if !Smartphone && !NET20
        [DataMember]
#endif
        public virtual int Comments
        {
            get { return _comments; }
            set
            {
                if (_comments == value)
                {
                    return;
                }

                _comments = value;
                OnPropertyChanged("Comments");
            }
        }

#if !Smartphone && !NET20
        [DataMember]
#endif
        public virtual int Rt
        {
            get { return _rt; }
            set
            {
                if (_rt == value)
                {
                    return;
                }

                _rt = value;
                OnPropertyChanged("Rt");
            }
        }

        public virtual string RawSource { get; set; }
    }
}
